package com.example.project.framework;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

@Configuration
public class Interceptor extends WebMvcConfigurationSupport {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {

        registry.addInterceptor(new DataInterceptor()).addPathPatterns("/**/**")
            .excludePathPatterns(SpringDispather.dataList);
        super.addInterceptors(registry);
    }
}
